import {
  Toast
} from "vant";
import cTitle from "components/title";

export default {
  data() {
    return {
      list: [],
      page: 1,
      level_weight: 0, //身份 大于1展示下级
    };
  },

  components: {
    cTitle
  },
  activated() {
    console.log(localStorage.getItem("uid"), 'uid')
    if (!localStorage.getItem("uid")) {
      this.$router.push(this.fun.getUrl("member"));
      return
    }
    this.getData();
  },
  computed: {

  },
  methods: {
    toAichatHistory(id) {
        this.$router.push(this.fun.getUrl("yunAichatHistory",{id: id}));
    },
    toTeam(id) {
        this.$router.push(this.fun.getUrl("yunAiclueTeam",{id: id}));
    },
    getData() {
      $http.get("ZhengChengYc.liaotian_xiaji_new", {
        uid: localStorage.getItem("uid")
      }, "加载中").then((res) => {
        if (res.result == 1) {
          console.log(res, 'liaotian_xiaji_new')
          this.list = res.data.data;
          this.level_weight = res.data.user ? res.data.user.level_weight : 0
        }
      });
    },

  }
};